<template>
	<el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="visible" :show-close="false" append-to-body>
		<video :src="url" controls="controls" class="my-video">
			your browser does not support the video tag
		</video>
		<span slot="footer" class="dialog-footer">
			<el-button type="primary" @click="cancel()">退 出</el-button>
		</span>
	</el-dialog>
</template>

<script>
	export default {
		name: 'z-video',
		data() {
			return {
				visible:true,
			}
		},
		props: {
			url: {
				type: String,
				default: ''
			}
		},
		methods: {
			//退出操作
			cancel() {
				this.visible = false
				this.$emit('closeDialog')
			}
		}
	}
</script>

<style scoped>
	.my-video{
		width:100%;
	}
</style>
